package com.yoga.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yoga.model.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author yan
 * @date 2025/8/16
 */
@Mapper
public interface CourseMapper extends BaseMapper<Course>{

    // Page<Course> findAll(Page<Course> page, String courseName,String coachName);
    Page<Course> findAll(Page<Course> page,Course course);


    List<Course> findAlls();


    @Select("SELECT contain,name from course order by contain desc limit 6")
    List<Map<String, Object>> getAll();
}
